package com.ssy.lingxi.purchase.repository.tender;

import com.ssy.lingxi.purchase.entity.tender.InviteTender;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 投标持久化层
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/3/1
 */
public interface InviteTenderRepository extends JpaRepository<InviteTender,Long>, JpaSpecificationExecutor<InviteTender> {
    List<InviteTender> findByMemberIdAndMemberRoleIdAndInviteTenderType(Long memberId, Long memberRoleId, Integer inviteTenderType);

    List<InviteTender> findByInviteTenderType(Integer inviteTenderType);

    Boolean existsByTemplateIdIn(List<Long> templateIdList);

    Boolean existsByTemplateId(Long templateId);
}
